<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>登录</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }

      form {
        width: 500px;
        padding: 20px;
        margin: 50px auto;
        border: 3px solid pink;
        display: flex;
        flex-direction: column;
        font-size: 30px;
        padding-top: 50px;
        position: relative;
      }

      form > span {
        position: absolute;
        left: 50%;
        top: 5px;
        transform: translateX(-50%);
        width: 100%;
        text-align: center;
        color: red;

        display: none;
      }

      form > label {
        height: 50px;
      }

      form > label > input {
        font-size: 24px;
        height: 40px;
        padding-left: 20px;
      }
    </style>
  </head>

  <body>
    <form>
      <span class="error">用户名或密码错误！</span>
      <label for="">
        用户名：<input
          type="text"
          class="username"
          placeholder="请输入用户名"
        />
      </label>

      <label for="">
        密码：<input type="password" class="password" placeholder="密码" />
      </label>

      <button>登录</button>
    </form>
  </body>

  <script src="./login.js"></script>
</html>
